#include <cs50.h>
#include <stdio.h>

void
swap (int *x, int *y, int *z);

int main () {
	printf("请输入a: ");
	int a = GetInt();
	printf("请输入b: ");
	int b = GetInt();
	printf("请输入c: ");
	int c = GetInt();

	printf("\n");
	printf("a=%d \n", a);
	printf("b=%d \n", b);
	printf("c=%d \n", c);

	swap(&a, &b, &c);
	
	printf("\n");
	printf("a=%d \n", a);
	printf("b=%d \n", b);
	printf("c=%d \n", c);
}

void
swap (int *x, int *y, int *z) {
	int tmp = *x;
	*x = *y;
	*y = *z;
	*z = tmp;
}

